<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
	
	<!--<link rel="stylesheet" href="${ctx}/static/bootstrap/css/bootstrap.css">
	<link rel="stylesheet" href="${ctx}/static/jqweui/css/weui.css">
	<link rel="stylesheet" href="${ctx}/static/jqweui/css/jquery-weui.css">
	<link rel="stylesheet" href="${ctx}/static/jqweui/css/icard.css?v=${cssVersion}">
	<link rel="stylesheet" href="${ctx}/static/font-awesome-4.7.0/css/font-awesome.css">-->


	<!--<link rel="stylesheet" href="../../static/bootstrap/css/bootstrap.css">
	<link rel="stylesheet" href="../../static/jqweui/css/weui.css">
	<link rel="stylesheet" href="../../static/jqweui/css/jquery-weui.css">
	<link rel="stylesheet" href="../../static/font-awesome-4.7.0/css/font-awesome.css">
	<link rel="stylesheet" href="../../static/jqweui/css/icard.css?v=${cssVersion}">-->
	
	<!--使用了CDN加速的CSS样式-->
	<link href="https://cdn.bootcss.com/twitter-bootstrap/3.4.1/css/bootstrap.min.css" rel="stylesheet">
	<link href="https://cdn.bootcss.com/weui/1.1.3/style/weui.min.css" rel="stylesheet">
	<link href="https://cdn.bootcss.com/jquery-weui/1.2.1/css/jquery-weui.min.css" rel="stylesheet">
	<link href="https://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
	<link rel="stylesheet" href="${ctx}/static/jqweui/css/icard.css?v=${cssVersion}">
	
	
	<title>东山精密问卷调查</title>

	<style>

		.seperate_section {
			border-top: #CCCCCC solid 20px;
			margin-top: 20px;
		}

		.wx-bind-header {
			padding: 35px 0px;
		}

		.wx-bind-title {
			text-align: center;
			font-size: 28px;
			color: #2e6da4;
			font-weight: 400;
		}
		
		.sub-title {
			text-align: center;
			font-size: 14px;
		}
		
		.warn-style{
			color: red;
			font-size: 14px;
			text-align: justify;
			padding: 15px;
			padding-top: 0px;
		}

	</style>

</head>
<body>
<header class="wx-bind-header" >
	<h3 class="wx-bind-title">东山精密员工调查登记</h3>
	<h5 class="sub-title">该调查问卷一个用户只可提交一次!</h5>
	<h5 class="sub-title">"盐城牧东"公司的员工请选择"盐城东山"公司。</h5>
</header>

<p class="warn-style">
	&nbsp;&nbsp;&nbsp;&nbsp;请认真填写本调查表,确保信息准确、真实、及时、详尽、完整。 对涉及知情不报、缓报、瞒报、漏报的,经查实公安机关将依法追究法律责任。
	如因过失造成传染病传播,情节严重或危害公共安全的,依《刑法》 将可能被处3年以上 7年以下有期徒刑;
</p>

<form id="questionnaireForm" onsubmit="return false;" method="post">
	
	<div class="weui-cell">
		<input type="hidden" id="companyno" name="companyno" value="${company!?html}">
		<input type="hidden" id="companyname" name="companyname" value="${companyName!?html}">
		<div class="weui-cell__hd"><label class="weui-label">您的所在公司:</label></div>
		<div class="weui-cell__bd input-group">
			<select class="input-sm form-control col-sm-5-8" id="chooseCompany" onchange="getCompany();">
				<option value="01-02@苏州东山精密" <#if company=='01-02'>selected="selected"</#if>>苏州东山精密</option>
				<option value="01-09@苏州牧东" <#if company=='01-09'>selected="selected"</#if>>苏州牧东</option>
				<option value="01-10@苏州永创" <#if company=='01-10'>selected="selected"</#if>>苏州永创</option>
				<option value="01-11@苏州诚镓" <#if company=='01-11'>selected="selected"</#if>>苏州诚镓</option>

				<option value="01-07@盐城东山精密" <#if company=='01-07'>selected="selected"</#if>>盐城东山精密</option>
				<option value="01-08@盐城通信" <#if company=='01-08'>selected="selected"</#if>>盐城通信</option>
			</select>
		</div>
	</div>

	<div class="weui-cell">
		<div class="weui-cell__hd"><label class="weui-label">您的身份证号:</label></div>
		<div class="weui-cell__bd input-group">
			<input class="weui-input" id="idcardno" name="idcardno" type="text" placeholder="请输入身份证号" onblur="checkIdcardno();">
		</div>
	</div>

	<div class="weui-cell">
		<div class="weui-cell__hd"><label class="weui-label">您的工号:</label></div>
		<div class="weui-cell__bd input-group">
			<input class="weui-input" id="employeeno" name="employeeno" type="text" placeholder="请输入工号">
		</div>
	</div>

	<div class="weui-cell">
		<div class="weui-cell__hd"><label class="weui-label">您的姓名:</label></div>
		<div class="weui-cell__bd input-group">
			<input class="weui-input" id="employeename" name="employeename" type="text" placeholder="请输入姓名">
		</div>
	</div>

	<div class="weui-cell">
		<div class="weui-cell__hd"><label class="weui-label">您的手机号码:</label></div>
		<div class="weui-cell__bd input-group">
			<input class="weui-input" id="phoneNumber" name="phoneNumber" type="text" placeholder="请输入手机号码">
		</div>
	</div>

	<div class="weui-cell">
		<div class="weui-cell__hd"><label class="weui-label">您的身份证地址:</label></div>
		<div class="weui-cell__bd input-group">
			<input class="weui-input" id="idcardnoAddress" name="idcardnoAddress" type="text" placeholder="请输入身份证地址">
		</div>
	</div>

	<div class="weui-cell">
		<div class="weui-cell__hd"><label class="weui-label">您的老家是哪里:</label></div>
		<div class="weui-cell__bd input-group">
			<input class="weui-input" id="nativePlace" name="nativePlace" type="text" placeholder="请输入老家地址">
		</div>
	</div>

	<div class="weui-cell">
		<div class="weui-cell__hd"><label class="weui-label">您现在${city}居住地址:</label></div>
		<div class="weui-cell__bd input-group">
			<div class="form-group">
				<label class="radio-inline">
					<input type="radio" value="宿舍" name="residenceAddress" onclick="hideResidenceAddress();">宿舍
				</label>
				<label class="radio-inline">
					<input type="radio" value="其他地址" name="residenceAddress" onclick="showResidenceAddress();">其他地址
				</label>
			</div>
		</div>
	</div>

	<div id="div_residenceAddressDes" class="weui-cell" style="display: none;">
		<div class="weui-cell__hd"><label class="weui-label">居住地址详情:</label></div>
		<div class="weui-cell__bd input-group">
			<input class="weui-input" id="residenceAddressDes" name="residenceAddressDes" type="text" placeholder="格式: 市区镇街道小区几栋几单元几室">
		</div>
	</div>

	<!-- 春节是否去过苏州以外地方 -->
	<div class="weui-cell seperate_section">
		<div class="weui-cell__hd"><label class="weui-label">春节是否去过${city}以外地方:</label></div>
		<div class="weui-cell__bd input-group">
			<div class="form-group">
				<label class="radio-inline">
					<input type="radio" value="0" name="beenToOtherplace" onclick="hideBeenToOtherplace();">否
				</label>
				<label class="radio-inline">
					<input type="radio" value="1" name="beenToOtherplace" onclick="showBeenToOtherplace();">是
				</label>
			</div>
		</div>
	</div>

	<div id="beenToOtherplace_true" style="display: none;">
		<div class="weui-cell">
			<div class="weui-cell__hd"><label class="weui-label">目的地:</label></div>
			<div class="weui-cell__bd input-group">
				<input class="weui-input" id="destination" name="destination" type="text" placeholder="请输入目的地">
			</div>
		</div>

		<div class="weui-cell">
			<div class="weui-cell__hd"><label class="weui-label">出发时间:</label></div>
			<div class="weui-cell__bd input-group">
				<input class="weui-input" id="goOffTime" name="goOffTime" type="text" placeholder="请选择出发时间">
			</div>
		</div>
		
		<div class="weui-cell">
			<div class="weui-cell__hd"><label class="weui-label">您出发的交通工具</label></div>
			<div class="weui-cell__bd input-group">
				<input type="hidden" id="goOffTransport" name="goOffTransport" value="自驾">
				<select class="input-sm form-control col-sm-5-8" id="chooseGoOffTransport" onchange="getGoOffTransport();">
					<option value="自驾" selected="selected">自驾</option>
					<option value="火车">火车</option>
					<option value="飞机">飞机</option>
					<option value="其他">其他</option>
				</select>
			</div>
		</div>
		
		<div class="weui-cell">
			<div class="weui-cell__hd"><label id="label_goOffTransportDes" class="weui-label">车牌号</label></div>
			<div class="weui-cell__bd input-group">
				<input class="weui-input" id="goOffTransportDes" name="goOffTransportDes" type="text" placeholder="交通工具详情">
			</div>
		</div>
		
		<div class="weui-cell">
			<div class="weui-cell__hd"><label class="weui-label">返回${city}时间:</label></div>
			<div class="weui-cell__bd input-group">
				<input class="weui-input" id="returnTime" name="returnTime" type="text" placeholder="请选择返回${city}时间">
			</div>
		</div>
		
		<div class="weui-cell">
			<div class="weui-cell__hd"><label class="weui-label">您返回的交通工具</label></div>
			<div class="weui-cell__bd input-group">
				<input type="hidden" id="returnTransport" name="returnTransport" value="自驾">
				<select class="input-sm form-control col-sm-5-8" id="chooseReturnTransport" onchange="getReturnTransport();">
					<option value="自驾" selected="selected">自驾</option>
					<option value="火车">火车</option>
					<option value="飞机">飞机</option>
					<option value="其他">其他</option>
				</select>
			</div>
		</div>
		
		<div class="weui-cell">
			<div class="weui-cell__hd"><label id="label_returnTransportDes" class="weui-label">车牌号</label></div>
			<div class="weui-cell__bd input-group">
				<input class="weui-input" id="returnTransportDes" name="returnTransportDes" type="text" placeholder="交通工具详情">
			</div>
		</div>
	</div>
	
	<!-- 您1月10日以来是否去过湖北或温州 -->
	<div class="weui-cell seperate_section" style="">
		<div class="weui-cell__hd"><label class="weui-label">您1月10日以来是否去过湖北或温州:</label></div>
		<div class="weui-cell__bd input-group">
			<div class="form-group">
				<label class="radio-inline">
					<input type="radio" value="0" name="beenToGivencity" onclick="hideBeenToGivencity();">否
				</label>
				<label class="radio-inline">
					<input type="radio" value="1" name="beenToGivencity" onclick="showBeenToGivencity();">是
				</label>
			</div>
		</div>
	</div>

	<div id="beenToGivencity_true" style="display: none;">

		<div class="weui-cell">
			<div class="weui-cell__hd"><label class="weui-label">城市名称:</label></div>
			<div class="weui-cell__bd input-group">
				<label class="radio-inline">
					<input type="radio" value="湖北" name="givencity">湖北
				</label>
				<label class="radio-inline">
					<input type="radio" value="温州" name="givencity">温州
				</label>
			</div>
		</div>

		<div class="weui-cell">
			<div class="weui-cell__hd"><label class="weui-label">您是否已经返回${city}:</label></div>
			<div class="weui-cell__bd input-group">
				<div class="form-group">
					<label class="radio-inline">
						<input type="radio" value="0" name="returnback" onclick="hideReturnback();">否
					</label>
					<label class="radio-inline">
						<input type="radio" value="1" name="returnback" onclick="showReturnback();">是
					</label>
				</div>
			</div>
		</div>

		<div id="div_returnbackTime" class="weui-cell" style="display: none;">
			<div class="weui-cell__hd"><label class="weui-label">您返回${city}的时间:</label></div>
			<div class="weui-cell__bd input-group">
				<input class="weui-input" id="returnbackTime" name="returnbackTime" type="text" placeholder="请选择返回${city}的时间">
			</div>
		</div>

		<div id="div_returnbackTransport" class="weui-cell" style="display: none;">
			<div class="weui-cell__hd"><label class="weui-label">您返回${city}的交通工具:</label></div>
			<div class="weui-cell__bd input-group">
				<input type="hidden" id="returnbackTransport" name="returnbackTransport" value="自驾">
				<select class="input-sm form-control col-sm-5-8" id="chooseReturnbackTransport" onchange="getReturnbackTransport();">
					<option value="自驾" selected="selected">自驾</option>
					<option value="火车">火车</option>
					<option value="飞机">飞机</option>
					<option value="其他">其他</option>
				</select>
			</div>
		</div>

		<div id="div_returnbackTransportDes" class="weui-cell" style="display: none;">
			<div class="weui-cell__hd"><label id="label_returnbackTransportDes" class="weui-label">车牌号:</label></div>
			<div class="weui-cell__bd input-group">
				<input class="weui-input" id="returnbackTransportDes" name="returnbackTransportDes" type="text" placeholder="交通工具详情">
			</div>
		</div>
	</div>

	<!-- 您1月10日以来是否与湖北省出来人员接触过 -->
	<div class="weui-cell seperate_section">
		<div class="weui-cell__hd"><label class="weui-label">您1月10日以来是否与湖北省出来人员接触过:</label></div>
		<div class="weui-cell__bd input-group">
			<div class="form-group">
				<label class="radio-inline">
					<input type="radio" value="0" name="contactPersonFromGivencity" onclick="hideContact();">否
				</label>
				<label class="radio-inline">
					<input type="radio" value="1" name="contactPersonFromGivencity" onclick="showContact();">是
				</label>
			</div>
		</div>
	</div>

	<div id="contactPersonFromGivencity_true" style="display: none;">
		<div class="weui-cell">
			<div class="weui-cell__hd"><label class="weui-label">您与湖北省出来人员接触日期:</label></div>
			<div class="weui-cell__bd input-group">
				<input class="weui-input" id="contactTime" name="contactTime" type="text" placeholder="请选择接触日期">
			</div>
		</div>

		<div class="weui-cell">
			<div class="weui-cell__hd"><label class="weui-label">您与湖北省出来人员接触方式:</label></div>
			<div class="weui-cell__bd input-group">
				<input type="hidden" id="contactWay" name="contactWay" value="聚餐">
				<select class="input-sm form-control col-sm-5-8" id="chooseContactWay" onchange="getContactWay();">
					<option value="聚餐" selected="selected">聚餐</option>
					<option value="一起生活">一起生活</option>
					<option value="其他">其他</option>
				</select>
			</div>
		</div>

		<div id="div_contactWayDes" class="weui-cell" style="display: none;">
			<div class="weui-cell__hd"><label class="weui-label">接触方式详情:</label></div>
			<div class="weui-cell__bd input-group">
				<input class="weui-input" id="contactWayDes" name="contactWayDes" type="text" placeholder="请输入接触方式详情">
			</div>
		</div>
	</div>


	<!-- 您现在人在苏州还是外地 -->
	<div class="weui-cell seperate_section">
		<div class="weui-cell__hd"><label class="weui-label">您现在人在${city}还是外地:</label></div>
		<div class="weui-cell__bd input-group">
			<div class="form-group">
				<label class="radio-inline">
					<input type="radio" value="${city}" name="whereNow" onclick="hideWhereNow();">${city}
				</label>
				<label class="radio-inline">
					<input type="radio" value="外地" name="whereNow" onclick="showWhereNow();">外地
				</label>
			</div>
		</div>
	</div>
	<!-- 现在人在外地时须填写的信息 -->
	<div id="whereNow_true" style="display: none;">

		<div class="weui-cell">
			<div class="weui-cell__hd"><label class="weui-label">外地名称:</label></div>
			<div class="weui-cell__bd input-group">
				<input class="weui-input" id="whereNowDes" name="whereNowDes" type="text" placeholder="请输入外地名称">
			</div>
		</div>

		<div class="weui-cell">
			<div class="weui-cell__hd"><label class="weui-label">您计划返回${city}的时间:</label></div>
			<div class="weui-cell__bd input-group">
				<input class="weui-input" id="returnbackPlanTime" name="returnbackPlanTime" type="text" placeholder="请选择计划返回${city}的时间">
			</div>
		</div>

		<div class="weui-cell">
			<div class="weui-cell__hd"><label class="weui-label">您计划返回${city}的交通工具:</label></div>
			<div class="weui-cell__bd input-group">
				<input type="hidden" id="returnbackPlanTransport" name="returnbackPlanTransport" value="自驾">
				<select class="input-sm form-control col-sm-5-8" id="chooseReturnbackPlanTransport" onchange="getReturnbackPlanTransport();">
					<option value="自驾" selected="selected">自驾</option>
					<option value="火车">火车</option>
					<option value="飞机">飞机</option>
					<option value="其他">其他</option>
				</select>
			</div>
		</div>

		<div class="weui-cell">
			<div class="weui-cell__hd"><label id="label_returnbackPlanTransportDes" class="weui-label">车牌号:</label></div>
			<div class="weui-cell__bd input-group">
				<input class="weui-input" id="returnbackPlanTransportDes" name="returnbackPlanTransportDes" type="text" placeholder="交通工具详情">
			</div>
		</div>
	</div>


	<!-- 您现在的身体状况 -->
	<div class="weui-cell seperate_section">
		<div class="weui-cell__hd"><label class="weui-label">您现在的身体状况:</label></div>
		<div class="weui-cell__bd input-group">
			<input type="hidden" id="physicalCondition" name="physicalCondition" value="正常">
			<select class="input-sm form-control col-sm-5-8" id="choosePhysicalCondition" onchange="getPhysicalCondition();">
				<option value="正常" selected="selected">正常</option>
				<option value="发热/咳嗽/感冒">发热/咳嗽/感冒</option>
				<option value="其他">其他</option>
			</select>
		</div>
	</div>

<!-- 身体状况为"发热/咳嗽/感冒"时 -->
<div id="div_physicalCondition_fever" style="display: none;">
	
	<div class="weui-cell">
		<div class="weui-cell__hd"><label class="weui-label">发热温度</label></div>
		<div class="weui-cell__bd input-group">
			<input class="weui-input" id="feverTemperature" name="feverTemperature" type="text" placeholder="请输入发热温度">
		</div>
	</div>
	<div class="weui-cell">
		<div class="weui-cell__hd"><label class="weui-label">持续天数</label></div>
		<div class="weui-cell__bd input-group">
			<input class="weui-input" id="durationDay" name="durationDay" type="text" placeholder="请输入持续天数">
		</div>
	</div>
	<div class="weui-cell">
		<div class="weui-cell__hd"><label class="weui-label">是否就医</label></div>
		<div class="weui-cell__bd input-group">
			<div class="form-group">
				<label class="radio-inline">
					<input type="radio" value="未就医" name="seeDoctor" onclick="hideSeeDoctor();">未就医
				</label>
				<label class="radio-inline">
					<input type="radio" value="已就医" name="seeDoctor" onclick="showSeeDoctor();">已就医
				</label>
			</div>
		</div>
	</div>
	<div id="div_seeDoctor" class="weui-cell" style="display: none;">
		<div class="weui-cell__hd"><label class="weui-label">诊断结果</label></div>
		<div class="weui-cell__bd input-group">
			<input class="weui-input" id="diagnosticResult" name="diagnosticResult" type="text" placeholder="请输入诊断结果">
		</div>
	</div>
</div>

	<!-- 身体状况为"其他"时 -->
	<div id="div_PhysicalConditionDes" class="weui-cell" style="display: none;">
		<div class="weui-cell__hd"><label id="label_physicalConditionDes" class="weui-label">身体状况详情:</label></div>
		<div class="weui-cell__bd input-group">
			<input class="weui-input" id="physicalConditionDes" name="physicalConditionDes" type="text" placeholder="身体状况详情">
		</div>
	</div>
	
	
	<!-- 您身边是否有疑似或确诊新型肺炎人员 -->
	<div class="weui-cell seperate_section">
		<div class="weui-cell__hd"><label class="weui-label">您身边是否有疑似或确诊新型肺炎人员:</label></div>
		<div class="weui-cell__bd input-group">
			<div class="form-group">
				<label class="radio-inline">
					<input type="radio" value="0" name="pneumoniaAround" onclick="hidePneumoniaAround();">否
				</label>
				<label class="radio-inline">
					<input type="radio" value="1" name="pneumoniaAround" onclick="showPneumoniaAround();">是
				</label>
			</div>
		</div>
	</div>

	<div id="div_pneumoniaRelation" class="weui-cell" style="display: none;">
		<div class="weui-cell__hd"><label class="weui-label">与您的亲属关系:</label></div>
		<div class="weui-cell__bd input-group">
			<input class="weui-input" id="pneumoniaRelation" name="pneumoniaRelation" type="text" placeholder="请填写与您的亲属关系">
		</div>
	</div>


<!-- 您现在是否因外地返回而处于自我隔离期 -->
<div class="weui-cell seperate_section">
	<div class="weui-cell__hd"><label class="weui-label">您现在是否因外地返回而处于自我隔离期</label></div>
	<div class="weui-cell__bd input-group">
		<div class="form-group">
			<label class="radio-inline">
				<input type="radio" value="0" name="selfIsolate" onclick="hideSelfIsolate();">否
			</label>
			<label class="radio-inline">
				<input type="radio" value="1" name="selfIsolate" onclick="showSelfIsolate();">是
			</label>
		</div>
	</div>
</div>

<div id="selfIsolate_true" style="display: none;">
	
	<div class="weui-cell">
		<div class="weui-cell__hd"><label class="weui-label">隔离地点</label></div>
		<div class="weui-cell__bd input-group">
			<input class="weui-input" id="isolateLocation" name="isolateLocation" type="text" placeholder="请填写隔离地点">
		</div>
	</div>
	<div class="weui-cell">
		<div class="weui-cell__hd"><label class="weui-label">隔离开始时间</label></div>
		<div class="weui-cell__bd input-group">
			<input class="weui-input" id="isolateStartTime" name="isolateStartTime" type="text" placeholder="请选择隔离开始时间">
		</div>
	</div>
	<div class="weui-cell">
		<div class="weui-cell__hd"><label class="weui-label">隔离结束时间</label></div>
		<div class="weui-cell__bd input-group">
			<input class="weui-input" id="isolateEndTime" name="isolateEndTime" type="text" placeholder="请选择隔离结束时间">
		</div>
	</div>
</div>

<!-- 提交按钮 -->
<div class="weui-btn-area" style="margin-bottom: 20px;">
		<button class="weui-btn weui-btn_primary btn-color-light-blue" id="submitBtn">提交</button>
	</div>
</form>



<!--<script src="${ctx}/static/jqweui/js/jquery-2.1.4.js"></script>
<script src="${ctx}/static/jqweui/js/jquery-weui.js?v=1.3"></script>
<script src="${ctx}/static/handlerbars.min.js"></script>
<script src="${ctx}/static/bootstrap/js/bootstrap.js"></script>
<script src="${ctx}/static/bootstrap/js/bootstrap-suggest.min.js"></script>
<script src="${ctx}/static/jquery.qrcode.min.js"></script>
<script src="${ctx}/static/jqweui/js/exif.js"></script>
<script src="${ctx}/static/laydate-v5.0.9/laydate.js"></script>
<script src="${ctx}/static/js/index.js"></script>-->

<!--
<script src="../../static/jqweui/js/jquery-2.1.4.js"></script>
<script src="../../static/jqweui/js/jquery-weui.js?v=1.3"></script>
<script src="../../static/jqweui/js/exif.js"></script>
<script src="../../static/bootstrap/js/bootstrap.js"></script>
<script src="../../static/bootstrap/js/bootstrap-suggest.min.js"></script>
<script src="../../static/handlerbars.min.js"></script>
<script src="../../static/jquery.qrcode.min.js"></script>

<script src="../../static/laydate-v5.0.9/laydate.js"></script>
<script src="../../static/js/index.js"></script>
-->

<!-- 使用了CDN加速 -->
<script src="https://cdn.bootcss.com/jquery/2.1.4/jquery.min.js"></script>
<script src="https://cdn.bootcss.com/jquery-weui/1.2.1/js/jquery-weui.min.js"></script>
<script src="${ctx}/static/jqweui/js/exif.js"></script>
<script src="https://cdn.bootcss.com/twitter-bootstrap/3.4.1/js/bootstrap.min.js"></script>
<script src="${ctx}/static/bootstrap/js/bootstrap-suggest.min.js"></script>
<script src="${ctx}/static/handlerbars.min.js"></script>
<script src="${ctx}/static/jquery.qrcode.min.js"></script>

<script src="${ctx}/static/laydate-v5.0.9/laydate.js"></script>
<script src="${ctx}/static/js/index.js"></script>


<script>
	//加载日期控件
	renderLaydate(
		["goOffTime","returnTime","returnbackTime","contactTime","returnbackPlanTime",
			"isolateStartTime","isolateEndTime"],
		"date","yyyy-MM-dd",true);


	/**
	 * 根据选择的公司获取companyno,companyname
	 */
	function getCompany(){
		var company=$("#chooseCompany").val();
		company=company.split("@");
		$("#companyno").val(company[0]);
		$("#companyname").val(company[1]);
		var city = "苏州";
		if(company[1].indexOf("盐城")==0){
            window.location.href="${ctx}/face/collect-info?city=yc&company="+company[0]+"&companyName="+company[1];  //
		}else{
            window.location.href="${ctx}/face/collect-info?city=sz&company="+company[0]+"&companyName="+company[1];  //
		}

	}
	
	/**
	 * 检查身份证号(idcardno)。
	 */
	function checkIdcardno(){
		var companyno=$("#companyno").val();
		var idcardno=$("#idcardno").val();
		//暂时认为idcardno为18位。
		if(idcardno!=null&&idcardno.toString().length==18){
			//将idcardno转为大写
			idcardno=idcardno.toString().toUpperCase();
			$("#idcardno").val(idcardno);
			
			$.ajax({
				url: "${ctx}/questionnaire/checkIdcardno",
				type: "POST",
				datatype: "json",
				data: {
					companyno: companyno,
					idcardno: idcardno
				},
				success: function (data, stats) {
					if (data.success) {
						$("#employeeno").val(data.data.employeeno);
						$("#employeename").val(data.data.employeename);
					} else {
						alert(data.msg);
						//Notiflix.Notify.Failure("检查employeenos时发生错误，" + data.msg);
					}
				},
				error: function (data) {
					//Notiflix.Notify.Failure("检查employeenos失败！");
				}
			});
		}
	}
	
	/**
	 * 隐藏 div_residenceAddressDes
	 */
	function hideResidenceAddress(){
		$("#div_residenceAddressDes").hide();
	}

	function showResidenceAddress() {
		$("#div_residenceAddressDes").show();
	}

	/**
	 * 隐藏 beenToOtherplace_true
	 */
	function hideBeenToOtherplace() {
		$("#beenToOtherplace_true").hide();
	}

	function showBeenToOtherplace() {
		$("#beenToOtherplace_true").show();
	}

	/**
	 * 隐藏beenToGivencity_true
	 */
	function hideBeenToGivencity() {
		$("#beenToGivencity_true").hide();
	}

	function showBeenToGivencity() {
		$("#beenToGivencity_true").show();
	}

	/**
	 * 隐藏div_returnbackTime，div_returnbackTransport,div_returnbackTransportDes
	 */
	function hideReturnback(){
		$("#div_returnbackTime").hide();
		$("#div_returnbackTransport").hide();
		$("#div_returnbackTransportDes").hide();
	}

	function showReturnback() {
		$("#div_returnbackTime").show();
		$("#div_returnbackTransport").show();
		$("#div_returnbackTransportDes").show();
	}

	/**
	 * 改变交通工具详情标题。
	 */
	function getReturnbackTransport(){
		var returnbackTransport=$("#chooseReturnbackTransport").val();
		$("#returnbackTransport").val(returnbackTransport);

		var returnbackTransportDes_title=null;
		switch (returnbackTransport){
			case "自驾":
				returnbackTransportDes_title="车牌号";
				break;
			case "火车":
				returnbackTransportDes_title="车次";
				break;
			case "飞机":
				returnbackTransportDes_title="航班号";
				break;
			case "其他":
				returnbackTransportDes_title="交通工具详情";
				break;
		}
		$("#label_returnbackTransportDes").text(returnbackTransportDes_title);
	}

	/**
	 * 隐藏contactPersonFromGivencity_true
	 */
	function hideContact() {
		$("#contactPersonFromGivencity_true").hide();
	}

	function showContact() {
		$("#contactPersonFromGivencity_true").show();
	}

	/**
	 * 接触方式为"其他"时，显示"接触方式详情文本框"。
	 */
	function getContactWay(){
		var contactWay=$("#chooseContactWay").val();
		$("#contactWay").val(contactWay);

		//接触方式为"其他"时，显示"接触方式详情文本框"。
		if(contactWay=="其他"){
			$("#div_contactWayDes").show();
		}else {
			$("#div_contactWayDes").hide();
		}
	}

	/**
	 * 隐藏whereNow_true。
	 */
	function hideWhereNow() {
		$("#whereNow_true").hide();
	}

	function showWhereNow() {
		$("#whereNow_true").show();
	}

	/**
	 * 改变交通工具详情标题。
	 */
	function getReturnbackPlanTransport(){
		var returnbackPlanTransport=$("#chooseReturnbackPlanTransport").val();
		$("#returnbackPlanTransport").val(returnbackPlanTransport);

		var returnbackPlanTransportDes_title=null;
		switch (returnbackPlanTransport){
			case "自驾":
				returnbackPlanTransportDes_title="车牌号";
				break;
			case "火车":
				returnbackPlanTransportDes_title="车次";
				break;
			case "飞机":
				returnbackPlanTransportDes_title="航班号";
				break;
			case "其他":
				returnbackPlanTransportDes_title="交通工具详情";
				break;
		}
		$("#label_returnbackPlanTransportDes").text(returnbackPlanTransportDes_title);
	}

	/**
	 * 获取选择的身体状况。
	 */
	function getPhysicalCondition(){
		var physicalCondition=$("#choosePhysicalCondition").val();
		$("#physicalCondition").val(physicalCondition);
		
		switch (physicalCondition){
			case "正常":
				$("#div_physicalCondition_fever").hide();
				$("#div_PhysicalConditionDes").hide();
				break;
			case "发热/咳嗽/感冒":
				$("#div_physicalCondition_fever").show();
				$("#div_PhysicalConditionDes").hide();
				break;
			case "其他":
				$("#div_physicalCondition_fever").hide();
				$("#div_PhysicalConditionDes").show();
				break;
		}
	}

	/**
	 * 隐藏div_pneumoniaRelation。
	 */
	function hidePneumoniaAround(){
		$("#div_pneumoniaRelation").hide();
	}

	function showPneumoniaAround() {
		$("#div_pneumoniaRelation").show();
	}
	
	/**
	 * 选择出发的交通工具
	 */
	function getGoOffTransport(){
		var goOffTransport=$("#chooseGoOffTransport").val();
		$("#goOffTransport").val(goOffTransport);
		
		var goOffTransportDes_title=null;
		switch (goOffTransport){
			case "自驾":
				goOffTransportDes_title="车牌号";
				break;
			case "火车":
				goOffTransportDes_title="车次";
				break;
			case "飞机":
				goOffTransportDes_title="航班号";
				break;
			case "其他":
				goOffTransportDes_title="交通工具详情";
				break;
		}
		$("#label_goOffTransportDes").text(goOffTransportDes_title);
	}
	
	/**
	 * 选择返回的交通工具
	 */
	function getReturnTransport() {
		var returnTransport=$("#chooseReturnTransport").val();
		$("#returnTransport").val(returnTransport);
		
		var returnTransportDes_title=null;
		switch (returnTransport){
			case "自驾":
				returnTransportDes_title="车牌号";
				break;
			case "火车":
				returnTransportDes_title="车次";
				break;
			case "飞机":
				returnTransportDes_title="航班号";
				break;
			case "其他":
				returnTransportDes_title="交通工具详情";
				break;
		}
		$("#label_returnTransportDes").text(returnTransportDes_title);
	}
	
	
	/**
	 * 隐藏selfIsolate_true。
	 */
	function hideSelfIsolate(){
		$("#selfIsolate_true").hide();
	}
	
	function showSelfIsolate() {
		$("#selfIsolate_true").show();
	}
	
	/**
	 * 隐藏div_seeDoctor。
	 */
	function hideSeeDoctor(){
		$("#div_seeDoctor").hide();
	}
	
	function showSeeDoctor() {
		$("#div_seeDoctor").show();
	}
	
	
	
	
	/**
	 * 提交调查问卷信息。
	 */
	$("#submitBtn").click(function () {

		/**
		 * 分析信息是否填写完整
		 */
		var companyno=$("#companyno").val();
		var companyname=$("#companyname").val();
		var idcardno=$("#idcardno").val();
		var employeeno=$("#employeeno").val();
		var employeename=$("#employeename").val();
		var phoneNumber=$("#phoneNumber").val();
		var idcardnoAddress=$("#idcardnoAddress").val();
		var nativePlace=$("#nativePlace").val();
		var residenceAddress=$('input[name="residenceAddress"]:checked').val();
		
		var beenToOtherplace=$('input[name="beenToOtherplace"]:checked').val();
		var beenToGivencity=$('input[name="beenToGivencity"]:checked').val();
		var contactPersonFromGivencity=$('input[name="contactPersonFromGivencity"]:checked').val();
		var whereNow=$('input[name="whereNow"]:checked').val();
		var physicalCondition=$("#physicalCondition").val();
		var pneumoniaAround=$('input[name="pneumoniaAround"]:checked').val();
		//自我隔离
		var selfIsolate=$('input[name="selfIsolate"]:checked').val();
		
		//分析信息是否完整
		if(isEmpty(companyno)){
			alert("请选择公司");
			return;
		}
		if(isEmpty(idcardno)){
			alert("请输入身份证号");
			return;
		}
		if(isEmpty(employeeno)){
			alert("请输入工号");
			return;
		}
		if(isEmpty(employeename)){
			alert("请输入姓名");
			return;
		}
		if(isEmpty(phoneNumber)){
			alert("请输入手机号码");
			return;
		}
		//手机号码需为11位
		if(!isEmpty(phoneNumber)&&phoneNumber.toString().trim().length!=11){
			alert("手机号码长度需为11位");
			return;
		}
		
		if(isEmpty(idcardnoAddress)){
			alert("请输入身份证地址");
			return;
		}
		if(isEmpty(nativePlace)){
			alert("请输入老家");
			return;
		}
		if(isEmpty(residenceAddress)){
			alert("请选择当前居住地址");
			return;
		}
		if(isEmpty(beenToOtherplace)){
			alert("请选择是否去过其他城市");
			return;
		}
		if(isEmpty(beenToGivencity)){
			alert("请选择是否去过湖北/温州");
			return;
		}
		if(isEmpty(contactPersonFromGivencity)){
			alert("请选择是否接触过湖北人");
			return;
		}
		if(isEmpty(whereNow)){
			alert("请选择是否在${city}城市");
			return;
		}
		if(isEmpty(physicalCondition)){
			alert("请选择身体状况");
			return;
		}
		if(isEmpty(pneumoniaAround)){
			alert("请选择身边是否有疑似肺炎人员");
			return;
		}
		if(isEmpty(selfIsolate)){
			alert("请选择是否处于自我隔离期")
			return
		}
		
		//进一步验证，用户输入的信息是否完整。
		var isValid=validateLevel_2();
		if(isValid==false){
			return;
		}
		
		/**
		 * 提交表单信息
		 */
		var submitData=$("#questionnaireForm").serialize();
		console.log(submitData);

		$("#submitBtn").attr("disabled",true);
		$.ajax({
			url : "${ctx}/questionnaire/addQuestionnaire",
			type : "POST",
			dataType:'json',
			data:$('#questionnaireForm').serialize(),
			success : function(data) {
				$("#submitBtn").attr("disabled",false);
				if (data.success) {
					alert("提交成功!");
					window.close();
				} else {
					alert(data.msg);
				}
			},
			error : function(data) {
				$("#submitBtn").attr("disabled",false);
			}
		});
	});
	
	/**
	 * 进一步验证，用户输入的信息是否完整。
	 * 验证错误时返回false; 验证成功返回true。
	 */
	function validateLevel_2() {
		//选择"其他地址"时验证
		var residenceAddress=$('input[name="residenceAddress"]:checked').val();
		if(residenceAddress=="其他地址"){
			var residenceAddressDes=$("#residenceAddressDes").val();
			if(isEmpty(residenceAddressDes)){
				alert("请输入居住地址详情");
				return false;
			}
		}
		
		//选择"去过其他地方"时
		var beenToOtherplace=$('input[name="beenToOtherplace"]:checked').val();
		if(beenToOtherplace==1){
			var destination=$("#destination").val();
			var goOffTime=$("#goOffTime").val();
			var goOffTransport=$("#goOffTransport").val();
			var goOffTransportDes=$("#goOffTransportDes").val();
			
			var returnTime=$("#returnTime").val();
			var returnTransport=$("#returnTransport").val();
			var returnTransportDes=$("#returnTransportDes").val();
			
			if(isEmpty(destination)){
				alert("请输入目的地");
				return false;
			}
			if(isEmpty(goOffTime)){
				alert("请选择出发时间");
				return false;
			}
			if(isEmpty(goOffTransport)){
				alert("请选择出发的交通工具");
				$("#chooseGoOffTransport").focus();
				return false;
			}
			if(isEmpty(goOffTransportDes)){
				alert("请选择交通工具详情");
				$("#goOffTransportDes").focus();
				return false;
			}
			
			if(isEmpty(returnTime)){
				alert("请选择返回时间");
				$("#returnTime").focus();
				return false;
			}
			if(isEmpty(returnTransport)){
				alert("请选择返回的交通工具");
				$("#chooseReturnTransport").focus();
				return false;
			}
			if(isEmpty(returnTransportDes)){
				alert("请输入交通工具详情");
				$("#returnTransportDes").focus();
				return false;
			}
		}
		
		//"是否去过湖北或温州"
		var beenToGivencity=$('input[name="beenToGivencity"]:checked').val();
		if(beenToGivencity==1){
			var givencity=$('input[name="givencity"]:checked').val();
			if(isEmpty(givencity)){
				alert("请选择湖北或温州");
				return false;
			}
			
			//"是否已经返回"
			var returnback=$('input[name="returnback"]:checked').val();
			if(isEmpty(returnback)){
				alert("请选择是否已经返回");
				return false;
			}
			//选择"已经返回"
			if(returnback==1){
				var returnbackTime=$("#returnbackTime").val();
				var returnbackTransport=$("#returnbackTransport").val();
				var returnbackTransportDes=$("#returnbackTransportDes").val();
				
				if(isEmpty(returnbackTime)){
					alert("请选择返回时间");
					$("#returnbackTime").focus();
					return false;
				}
				if(isEmpty(returnbackTransport)){
					alert("请选择返回的交通工具")
					$("#returnbackTransport").focus();
					return false;
				}
				if(isEmpty(returnbackTransportDes)){
					alert("请输入交通工具详情")
					$("#returnbackTransportDes").focus();
					return false;
				}
			}
		}
		
		//选择"接触过湖北省出来的人员"时
		var contactPersonFromGivencity=$('input[name="contactPersonFromGivencity"]:checked').val();
		if(contactPersonFromGivencity==1){
			var contactTime=$("#contactTime").val();
			if(isEmpty(contactTime)){
				alert("请选择接触湖北省人员的日期");
				return false;
			}
			
			var contactWay=$("#contactWay").val();
			if(isEmpty(contactWay)){
				alert("请选择接触的方式");
				return false;
			}
			//选择"接触方式"为"其他"
			if(contactWay=="其他"){
				var contactWayDes=$("#contactWayDes").val();
				if(isEmpty(contactWayDes)){
					alert("请输入接触方式详情");
					$("#contactWayDes").focus();
					return false;
				}
			}
		}
		
		//选择"现在人在外地"时
		var whereNow=$('input[name="whereNow"]:checked').val();
		if(whereNow=="外地"){
			
			var whereNowDes=$("#whereNowDes").val();
			if(isEmpty(whereNowDes)){
				alert("请输入外地名称");
				$("#whereNowDes").focus();
				return false;
			}
			
			var returnbackPlanTime=$("#returnbackPlanTime").val();
			if(isEmpty(returnbackPlanTime)){
				alert("请选择计划返回的时间");
				$("#returnbackPlanTime").focus();
				return false;
			}
			
			var returnbackPlanTransport=$("#returnbackPlanTransport").val();
			if(isEmpty(returnbackPlanTransport)){
				alert("请选择计划返回的交通工具");
				$("#returnbackPlanTransport").focus();
				return false;
			}
			
			var returnbackPlanTransportDes=$("#returnbackPlanTransportDes").val();
			if(isEmpty(returnbackPlanTransportDes)){
				alert("请选择交通工具详情");
				$("#returnbackPlanTransportDes").focus();
				return false;
			}
		}
		
		//选择"身体状况"为"其他"时
		var physicalCondition=$("#physicalCondition").val();
		
		if(physicalCondition=="发热/咳嗽/感冒"){
			var feverTemperature=$("#feverTemperature").val();
			var durationDay=$("#durationDay").val();
			
			if(isEmpty(feverTemperature)){
				alert("请输入发热温度");
				return false;
			}
			if(isEmpty(durationDay)){
				alert("请输入持续天数");
				return false;
			}
			
			//是否就医
			var seeDoctor=$('input[name="seeDoctor"]:checked').val();
			if(isEmpty(seeDoctor)){
				alert("请选择是否就医");
				return false;
			}
			
			if(seeDoctor=="已就医"){
				var diagnosticResult=$("#diagnosticResult").val();
				if(isEmpty(diagnosticResult)){
					alert("请输入诊断结果");
					return false;
				}
			}
		}
		
		if(physicalCondition=="其他"){
			var physicalConditionDes=$("#physicalConditionDes").val();
			if(isEmpty(physicalConditionDes)){
				alert("请输入身体状况详情");
				return false;
			}
		}
		
		//选择"身边有疑似肺炎人员"时
		var pneumoniaAround=$('input[name="pneumoniaAround"]:checked').val();
		if(pneumoniaAround==1){
			var pneumoniaRelation=$("#pneumoniaRelation").val();
			if(isEmpty(pneumoniaRelation)){
				alert("请输入与您的亲属关系");
				return false;
			}
		}
		
		//选择"因外地返回而处于自我隔离期"时
		var selfIsolate=$('input[name="selfIsolate"]:checked').val();
		if(selfIsolate==1){
			var isolateLocation=$("#isolateLocation").val();
			var isolateStartTime=$("#isolateStartTime").val();
			var isolateEndTime=$("#isolateEndTime").val();
			
			if(isEmpty(isolateLocation)){
				alert("请输入隔离地点");
				return false;
			}
			if(isEmpty(isolateStartTime)){
				alert("请选择开始隔离时间");
				return false;
			}
			if(isEmpty(isolateEndTime)){
				alert("请选择结束隔离时间");
				return false;
			}
		}
		
		
		//验证正确时，返回true。
		return true;
	}
	
	
	
	/**================= 工具方法 ===================*/
	/**
	 * 分析传入字段是否为空
	 * @param objStr
	 */
	function isEmpty(objStr) {
		if(objStr==null||objStr.toString().trim()==''){
			return true;
		}
		return false;
	}






</script>






</body>
</html>
